home *** CD-ROM | disk | FTP | other *** search
/ Complete Internet Archive / Complete Internet Archive.iso / Guest Books / guest book.txt < prev    next >
Text File  |  1997-01-26  |  21KB  |  533 lines

  1.  
  2.  
  3. #!/usr/local/bin/perl
  4. #
  5. # CHANGE THE TOP LINE TO POINT TO PERL ON YOUR SYSTEM AS '#!<perl_path>'
  6. #
  7. ##########################
  8. ## guestbook v2.21
  9. ##########################
  10. ## This script is called by the user with the appropriate Q_STRING
  11. ## that includes their login name, guest page path, and desired return page.
  12. ## It creates the forms page necessary for input POST portion of the script,
  13. ## which actually adds the guest to the noted guest page.
  14. ##
  15. ## The login name can be 'special' (see below), or a user in the passwd/NIS
  16. ## domain of the server.  A special user has the relative path listed, while
  17. ## passwd/NIS users must have their own public_html (or equivalent) directory
  18. ## and be readable/writeable by whatever group/user the http server is run as
  19. ## (this generally means world readable/writeable).
  20. ##
  21. ## The first thing you probably should change in these scripts is the
  22. ## path to the PERL executable.
  23. ##
  24. ## Thanks to tank@amoco.com (Jon A. Tankersley) for helping in the upgrade.
  25. ##########################
  26. #
  27. # QUERY_STRING should be of the form:
  28. # [http://domain]/scriptname?owner!guestpage[!returnpage]
  29. # where [...] are optional, depending on the configuration.
  30. #
  31. # For more help on this, you can read the auto-generated help script at
  32. # http://www.cs.uoregon.edu/cgi-bin/guestbook2
  33. #
  34. # This same help file will be output by your guestbook script when it is
  35. # properly placed in a script directory and accessed with no arguments
  36.  
  37. ##########################
  38. # EDITABLE PARAMETERS
  39. # Some of these lines may need to be changed.
  40. #
  41. # For Perl5 the '@'s NEED TO BE ESCAPED as shown (with a backslash).
  42. # Perl4 doesn't care either way.
  43.  
  44. ## domain of your WWW server, as 'http://<domain>'
  45. $wwwroot = "http://www.cs.uoregon.edu";
  46.  
  47. ## domain name for email addresses
  48. $domain = "\@cs.uoregon.edu";
  49.  
  50. ## mail program that is opened with a pipe
  51. ## To:, From: & Subject: are printed to this pipe
  52. $mailprog   = "/usr/lib/sendmail -t -oi -oem";
  53.  
  54. ## name of directory inside user's home directory which holds a
  55. ## user's HTML pages.  Usually 'public_html'
  56. $public_html = "public_html";
  57.  
  58. ## You can specify special users (those that do not have a login account).
  59. ## You specify a special key name to use a different directory as the root
  60. ## for the user's HTML pages.  The format is 'NAME, DIRECTORY' in tuples,
  61. ## where DIRECTORY is the root directory of NAME's pages.  'specialUserEmail'
  62. ## is used to specify an email address for special users since they probably
  63. ## aren't regular UNIX names.  These will also override normal usernames.
  64.  
  65. %specialUser = (
  66.     "root", "/usr/local/httpd/docs",
  67.     "http", "/usr/local/httpd/docs",
  68.                 );
  69.  
  70. %specialUserEmail = (
  71.     "root", "webmaster$domain",
  72.     "http", "webmaster$domain",
  73.                      );
  74.  
  75. # END OF EDITABLE PARAMETERS
  76. # YOU SHOULD NOT NEED TO EDIT ANYTHING BEYOND THIS POINT
  77. ##########################
  78.  
  79. # Information about the author
  80. $authorurl = "http://www.cs.uoregon.edu/~jhobbs/";
  81. $author    = "jhobbs\@cs.uoregon.edu";
  82.  
  83. if (defined $ENV{SCRIPT_NAME}) {
  84.     $scriptname = $ENV{SCRIPT_NAME};
  85. } else {
  86.     $scriptname = '/cgi-bin/guestbook2';
  87. }
  88.  
  89. # This gets the necessary info from the QUERY_STRING, if any
  90. #
  91. ($owner, $guestpage, $returnpage) = split('!', $ENV{QUERY_STRING});
  92.  
  93. # If not enough info was in the QUERY_STRING, it returns the help page
  94. #
  95. &Help() unless ($owner && $guestpage);
  96.  
  97. if ($ENV{'REQUEST_METHOD'} eq 'GET') {
  98.  
  99.     # This associative array relates the last internet domain segment
  100.     # to the most probable country of origin
  101.     %countryid = ('edu', 'USA', 'org', 'USA', 'com', 'USA', 'net', 'USA',
  102.               'gov', 'USA', 'mil', 'USA', 'us', 'USA', 'um', 'USA',
  103.               'af', 'Afghanistan',            'al', 'Albania',
  104.               'dz', 'Algeria',                'as', 'American Samoa',
  105.               'ad', 'Andorra',                'ao', 'Angola',
  106.               'ai', 'Anguilla',               'aq', 'Antarctica',
  107.               'ag', 'Antigua and Barbuda',    'ar', 'Argentina',
  108.               'am', 'Armenia',                'aw', 'Aruba',
  109.               'au', 'Australia',              'at', 'Austria',
  110.               'az', 'Azerbaijan',             'bs', 'Bahamas',
  111.               'bh', 'Bahrain',                'bd', 'Bangladesh',
  112.               'bb', 'Barbados',               'by', 'Belarus',
  113.               'be', 'Belgium',                'bz', 'Belize',
  114.               'bj', 'Benin',                  'bm', 'Bermuda',
  115.               'bt', 'Bhutan',                 'bo', 'Bolivia',
  116.               'ba', 'Bosnia and Herzegowina', 'bw', 'Botswana',
  117.               'bv', 'Bouvet Island',          'br', 'Brazil',
  118.               'io', 'British Indian Ocean Territory',
  119.               'bn', 'Brunei Darussalam',      'bg', 'Bulgaria',
  120.               'bf', 'Burkina Faso',           'bi', 'Burundi',
  121.               'kh', 'Cambodia',               'cm', 'Cameroon',
  122.               'ca', 'Canada',                 'cv', 'Cape Verde',
  123.               'ky', 'Cayman Islands',         'cf', 'Central African Republic',
  124.               'td', 'Chad',                   'cl', 'Chile',
  125.               'cn', 'China',                  'cx', 'Christmas Island',
  126.               'cc', 'Cocos (Keeling) Islands',
  127.               'co', 'Colombia',               'km', 'Comoros',
  128.               'cg', 'Congo',                  'ck', 'Cook Islands',
  129.               'cr', 'Costa Rica',             'ci', 'Cote d\'Ivoire',
  130.               'hr', 'Croatia (Hrvatska)',     'cu', 'Cuba',
  131.               'cy', 'Cyprus',                 'cz', 'Czech Republic',
  132.               'dk', 'Denmark',                'dj', 'Djibouti',
  133.               'dm', 'Dominica',               'do', 'Dominican Republic',
  134.               'tp', 'East Timor',             'ec', 'Ecuador',
  135.               'eg', 'Egypt',                  'sv', 'El Salvador',
  136.               'gq', 'Equatorial Guinea',      'er', 'Eritrea',
  137.               'ee', 'Estonia',                'et', 'Ethiopia',
  138.               'fk', 'Falkland Islands',       'fo', 'Faroe Islands',
  139.               'fj', 'Fiji',                   'fi', 'Finland',
  140.               'fr', 'France',                 'fx', 'France,',
  141.               'gf', 'French Guiana',          'pf', 'French Polynesia',
  142.               'tf', 'French Southern Territories',
  143.               'ga', 'Gabon',                  'gm', 'Gambia',
  144.               'ge', 'Georgia',                'de', 'Germany',
  145.               'gh', 'Ghana',                  'gi', 'Gibraltar',
  146.               'gr', 'Greece',                 'gl', 'Greenland',
  147.               'gd', 'Grenada',                'gp', 'Guadeloupe',
  148.               'gu', 'Guam',                   'gt', 'Guatemala',
  149.               'gn', 'Guinea',                 'gw', 'Guinea-Bissau',
  150.               'gy', 'Guyana',                 'ht', 'Haiti',
  151.               'hm', 'Heard and McDonald Islands',
  152.               'hn', 'Honduras',               'hk', 'Hong Kong',
  153.               'hu', 'Hungary',                'is', 'Iceland',
  154.               'in', 'India',                  'id', 'Indonesia',
  155.               'ir', 'Iran',                   'iq', 'Iraq',
  156.               'ie', 'Ireland',                'il', 'Israel',
  157.               'it', 'Italy',                  'jm', 'Jamaica',
  158.               'jp', 'Japan',                  'jo', 'Jordan',
  159.               'kz', 'Kazakhstan',             'ke', 'Kenya',
  160.               'ki', 'Kiribati',
  161.               'kp', 'Democratic People\'s Republic of Korea',
  162.               'kr', 'Republic of Korea',      'kw', 'Kuwait',
  163.               'kg', 'Kyrgyzstan',             'la', 'Lao Democratic Republic',
  164.               'lv', 'Latvia',                 'lb', 'Lebanon',
  165.               'ls', 'Lesotho',                'lr', 'Liberia',
  166.               'ly', 'Libya',                  'li', 'Liechtenstein',
  167.               'lt', 'Lithuania',              'lu', 'Luxembourg',
  168.               'mo', 'Macau',                  'mk', 'Macedonia,',
  169.               'mg', 'Madagascar',             'mw', 'Malawi',
  170.               'my', 'Malaysia',               'mv', 'Maldives',
  171.               'ml', 'Mali',                   'mt', 'Malta',
  172.               'mh', 'Marshall Islands',       'mq', 'Martinique',
  173.               'mr', 'Mauritania',             'mu', 'Mauritius',
  174.               'yt', 'Mayotte',                'mx', 'Mexico',
  175.               'fm', 'Micronesia',             'md', 'Moldova',
  176.               'mc', 'Monaco',                 'mn', 'Mongolia',
  177.               'ms', 'Montserrat',             'ma', 'Morocco',
  178.               'mz', 'Mozambique',             'mm', 'Myanmar',
  179.               'na', 'Namibia',                'nr', 'Nauru',
  180.               'np', 'Nepal',                  'nl', 'Netherlands',
  181.               'an', 'Netherlands Antilles',   'nc', 'New Caledonia',
  182.               'nz', 'New Zealand',            'ni', 'Nicaragua',
  183.               'ne', 'Niger',                  'ng', 'Nigeria',
  184.               'nu', 'Niue',                   'nf', 'Norfolk Island',
  185.               'mp', 'Northern Mariana Islands',
  186.               'no', 'Norway',                 'om', 'Oman',
  187.               'pk', 'Pakistan',               'pw', 'Palau',
  188.               'pa', 'Panama',                 'pg', 'Papua New Guinea',
  189.               'py', 'Paraguay',               'pe', 'Peru',
  190.               'ph', 'Philippines',            'pn', 'Pitcairn',
  191.               'pl', 'Poland',                 'pt', 'Portugal',
  192.               'pr', 'Puerto Rico',            'qa', 'Qatar',
  193.               're', 'Reunion',                'ro', 'Romania',
  194.               'ru', 'Russian Federation',     'rw', 'Rwanda',
  195.               'kn', 'Saint Kitts and Nevis',  'lc', 'Saint Lucia',
  196.               'vc', 'Saint Vincent and the Grenadines',
  197.               'ws', 'Samoa',                  'sm', 'San Marino',
  198.               'st', 'Sao Tome and Principe',  'sa', 'Saudi Arabia',
  199.               'sn', 'Senegal',                'sc', 'Seychelles',
  200.               'sl', 'Sierra Leone',           'sg', 'Singapore',
  201.               'sk', 'Slovakia',               'si', 'Slovenia',
  202.               'sb', 'Solomon Islands',        'so', 'Somalia',
  203.               'za', 'South Africa',           'gs', 'South Georgia',
  204.               'es', 'Spain',                  'lk', 'Sri Lanka',
  205.               'sh', 'St. Helena',             'pm', 'St. Pierre and Miquelon',
  206.               'sd', 'Sudan',                  'sr', 'Suriname',
  207.               'sj', 'Svalbard and Jan Mayen Islands',
  208.           'su', 'Former USSR',
  209.               'sz', 'Swaziland',              'se', 'Sweden',
  210.               'ch', 'Switzerland',            'sy', 'Syria',
  211.               'tw', 'Taiwan',                 'tj', 'Tajikistan',
  212.               'tz', 'Tanzania',               'th', 'Thailand',
  213.               'tg', 'Togo',                   'tk', 'Tokelau',
  214.               'to', 'Tonga',                  'tt', 'Trinidad and Tobago',
  215.               'tn', 'Tunisia',                'tr', 'Turkey',
  216.               'tm', 'Turkmenistan',           'tc', 'Turks and Caicos Islands',
  217.               'tv', 'Tuvalu',                 'ug', 'Uganda',
  218.               'ua', 'Ukraine',                'ae', 'United Arab Emirates',
  219.               'gb', 'United Kingdom',         'uk', 'United Kingdom',
  220.               'uy', 'Uruguay',                'uz', 'Uzbekistan',
  221.               'vu', 'Vanuatu',                'va', 'Vatican City',
  222.               've', 'Venezuela',              'vn', 'Viet Name',
  223.               'vg', 'British Virgin Islands', 'vi', 'US Virgin Islands',
  224.               'wf', 'Wallis and Futina Islands',
  225.               'eh', 'Western Sahara',         'ye', 'Yemen',
  226.               'yu', 'Yugoslavia',             'zr', 'Zaire',
  227.               'zm', 'Zambia',                 'zw', 'Zimbabwe',
  228.               );
  229.  
  230.     if (defined $specialUser{$owner}) {
  231.         $dir        = $specialUser{$owner};
  232.         $htmlpage   = "$wwwroot/$guestpage";
  233.         if (defined $specialUserEmail{$owner}) {
  234.             $address    = $specialUserEmail{$owner};
  235.         } else {
  236.             $address    = "$owner$domain";
  237.         }
  238.     }
  239.     else {
  240.         $dir = (getpwnam($owner))[7];
  241.         if (!$dir) {
  242.             die "Content-type: text/plain\n\n$owner is not a valid user, stopped";
  243.         }
  244.         $htmlpage   = "$wwwroot/~$owner/$guestpage";
  245.         $address    = "$owner$domain";
  246.     }
  247.  
  248.     @tmp = split(/\./, $ENV{REMOTE_HOST});
  249.     $country = $tmp[$#tmp];
  250.     $country =~ tr/A-Z/a-z/;
  251.     $country = $countryid{$country};
  252.     
  253.     print <<GUESTPAGE;
  254. Content-type: text/html
  255.  
  256. <HTML>
  257. <HEAD><TITLE>$owner\'s Guest Book Registry</TITLE></HEAD>
  258.  
  259. <BODY>
  260. <H2>Welcome to the guest book registry.</H2>
  261.  
  262. All the information below is optional, except for your name :^).  Please
  263. note that all names registered in the guest book are viewable by anyone.
  264. You can alternatively just <A HREF="mailto:$address">send mail</A>
  265. or look at the <A HREF="$scriptname">help</A>.
  266. <P>
  267. <B>Thanks for stopping by!</B>
  268.  
  269. <HR>
  270. <FORM METHOD="POST" ACTION="$scriptname?$ENV{QUERY_STRING}">
  271. <PRE>
  272.       Name: <INPUT TYPE="text" SIZE=44 NAME="name" VALUE="$ENV{REMOTE_IDENT}">
  273. City/State: <INPUT TYPE="text" SIZE=24 NAME="from"> Country: <INPUT TYPE="text"
  274. SIZE=8 NAME="country" VALUE="$country">
  275.      Email: <INPUT TYPE="text" SIZE=44 NAME="email" 
  276. VALUE="$ENV{REMOTE_IDENT}\@$ENV{REMOTE_HOST}">
  277.  
  278. Home/Favorite HTML Page (form: http://host.domain/page):
  279. <INPUT TYPE="text" SIZE=56 NAME="html" value="http://">
  280.  Page name: <INPUT TYPE="text" SIZE=44 NAME="pname">
  281.  
  282. Leave a note for all to see (will be shown in <PRE> tags):
  283. <TEXTAREA NAME="note" ROWS=3 COLS=55></TEXTAREA>
  284.  
  285. Leave a private note (only seen by $address):
  286. <TEXTAREA NAME="comment" ROWS=3 COLS=55></TEXTAREA>
  287.             <INPUT TYPE="submit" VALUE="Sign Guestbook">           <INPUT
  288. TYPE="reset" VALUE="Clear Form">
  289. </PRE>
  290. </FORM>
  291.  
  292. <HR>
  293. <P align=center><A HREF="$htmlpage"><B>View the guest book</B></A></P>
  294. <HR>
  295. The scripts for this guest book are written in Perl and available upon request
  296. from <A HREF="$authorurl">$author</A>.
  297. <P><ADDRESS><A HREF="mailto:$address">$address</A></ADDRESS>
  298. </BODY>
  299. </HTML>
  300.  
  301. GUESTPAGE
  302.  
  303. } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
  304.  
  305.     ###############################
  306.     ## addguest
  307.     ################################
  308.     ## This script, denoted "addguest", is called by submitting an entry
  309.     ## from the guestbook page.  This script mails the owner that a person has
  310.     ## signed the guest book, unless no name is specified, in which case an
  311.     ## error page is shown to the guest.  Otherwise the guest gets a thank you
  312.     ## page with a pointer to his name in the guestbook, the guestbook itself,
  313.     ## and the return page specified.
  314.     ################################
  315.     #
  316.     # keys: name, from, email, html, pname, note, comment
  317.  
  318.     if (defined $specialUser{$owner}) {
  319.         $dir        = $specialUser{$owner};
  320.         $returnpage = "$wwwroot/$returnpage";
  321.         $htmlpage   = "$wwwroot/$guestpage";
  322.         $guestpage  = "$dir/$guestpage";
  323.         if (defined $specialUserEmail{$owner}) {
  324.             $address    = $specialUserEmail{$owner};
  325.         } else {
  326.             $address    = "$owner$domain";
  327.         }
  328.     }
  329.     else {
  330.         $dir = (getpwnam($owner))[7];
  331.         if (!$dir) {
  332.             die "Content-type: text/plain\n\n$owner is not a valid user, stopped";
  333.         }
  334.         $returnpage = "$wwwroot/~$owner/$returnpage";
  335.         $htmlpage   = "$wwwroot/~$owner/$guestpage";
  336.         $guestpage  = "$dir/$public_html/$guestpage";
  337.         $address    = "$owner$domain";
  338.     }
  339.  
  340.     $date = `date`;
  341.     chop $date;
  342.     
  343.     # Get info from form and parse it
  344.     read(STDIN, $raw_data, $ENV{CONTENT_LENGTH});
  345.     
  346.     $items = split('&', $raw_data);
  347.     for ($i = 0; $i < $items; $i++) {
  348.         ($key,$value) = split('=', $_[$i]);
  349.         $value =~ tr/+/ /;
  350.         $value =~ s/%(..)/pack("C", hex($1))/eg;
  351.         $data{"$key"} = $value;
  352.     }
  353.     $rname = $data{name};
  354.     $rname =~ tr/ /+/;
  355.     $rname =~ tr/[A-Z]/[a-z]/;
  356.     
  357.     if ($data{name}) {
  358.     if (!$data{pname}) { $data{pname} = $data{html}; }
  359.     
  360.     open(GUESTS, ">> $guestpage") ||
  361.         die "Content-type: text/plain\n\nCan't open guest book $guestpage: $!\n";
  362.     print GUESTS "<HR>\n";
  363.     print GUESTS "<A NAME=\"$rname\"><B>$data{name}</B></A><BR>\n";
  364.     print GUESTS "$data{from}\t" if $data{from};
  365.     print GUESTS "$data{country}" if $data{country};
  366.     print GUESTS "<BR>\n";
  367.     print GUESTS "<I>$data{email}</I><BR>\n"           if $data{email};
  368.     if ($data{html} ne "http://") {
  369.         print GUESTS "<A HREF=\"$data{html}\">$data{pname}</A><BR>\n";
  370.     }
  371.     print GUESTS "<PRE>$data{note}</PRE>\n"         if $data{note};
  372.     print GUESTS "Signed on: $date<BR>\n\n";
  373.     close(GUESTS);
  374.     
  375.     print <<NEWPAGE;
  376. Content-type: text/html
  377.  
  378. <HTML>
  379. <HEAD><TITLE>Thank You</TITLE></HEAD>
  380. <BODY>
  381. <H3>Thank you $data{name}.</H3>
  382.  
  383. Feel free to view <A HREF="$htmlpage#$rname">your entry</A> in the
  384. <A HREF="$htmlpage">guest book</A> or <A HREF="$returnpage">return to
  385. $returnpage</A>. <P>
  386. <A HREF="$scriptname">Help</A><P>
  387.  
  388. <HR>
  389. <ADDRESS><A HREF="mailto:$address">$address</A></ADDRESS></BODY>
  390. </HTML>
  391.  
  392. NEWPAGE
  393.  
  394.     open(MAIL, "| $mailprog") ||
  395.         die "Content-type: text/plain\n\nCan't open mailprog $mailprog, stopped";
  396.     print MAIL <<"STOP";
  397. To: $address
  398. From: $data{email}
  399. Subject: $data{name} signed guest book
  400. Precedence: junk
  401.  
  402. \tName:\t$data{name}
  403. \tFrom:\t$data{from}, $data{country}
  404. \tHREF:\t$data{html}, $data{pname}
  405. \tEmail:\t$data{email}
  406. \tHost:\t$ENV{REMOTE_HOST}
  407. \tPage signed: $htmlpage
  408.  
  409. \tNote:
  410. $data{note}
  411.  
  412. \tComment:
  413. $data{comment}
  414. STOP
  415.     close(MAIL) || die "Content-type: text/plain\n\npipe exited $?";
  416.     }
  417.     else {
  418.         print <<NEWPAGE;
  419. Content-type: text/html
  420.  
  421. <HTML>
  422. <HEAD><TITLE>Oops...</TITLE></HEAD>
  423. <BODY>
  424. <H3>Oops...</H3>
  425.  
  426. You did not specify your name.  If you would like to submit
  427. an entry, please specify your name. <P>Thank you.<P>
  428.  
  429. <HR>
  430. <ADDRESS><A HREF="mailto:$address">$address</A></ADDRESS></BODY>
  431. </HTML>
  432.  
  433. NEWPAGE
  434.     }
  435. }
  436.  
  437. sub Help {
  438.  
  439.     print <<HELPPAGE;
  440. Content-type: text/html
  441.  
  442. <HTML>
  443. <HEAD>
  444. <TITLE>GuestBook help information</TITLE>
  445. </HEAD>
  446.  
  447. <BODY>
  448. <A HREF="#EndUser">Web Roamer Usage</A> of the guest book form.<BR>
  449. <A HREF="#Invocation">Invocation</A> of the guest book script.<BR>
  450. <A HREF="#Other">Other</A> information.<BR>
  451. <P>
  452. <HR>
  453.  
  454. <H3><A NAME="EndUser">Usage</A></H3>
  455.  
  456. All information in the guest book form beyond your name is optional.  The
  457. country name is best-guessed by checking your remote host's domain name.
  458. This domain name is also placed in the email field.
  459. <P>
  460. Everything except the 'private note' will be viewable on the guestpage.
  461. <P>
  462. <HR>
  463.  
  464. <H3><A NAME="Invocation">Invocation</A></H3>
  465. To invoke the script, make the following HREF link:
  466. (information in []'s is optional)
  467. <PRE>
  468. [http://domain]$scriptname?owner!guestpage[!returnpage]
  469. </PRE>
  470. <P>
  471.  
  472. <UL>
  473. <LI><I>$scriptname</I> is the path to the <A
  474. HREF="${authorurl}guestbook">guest book script</A>, and may vary from server
  475. to server.  The script must be placed in a valid script directory (ask you
  476. webmaster for details).  If, when accessing the script, you are receiving
  477. the script code back instead of the guest book form, it means that the
  478. script is not in a valid script directory.
  479.  <P>
  480. <LI>The ? and ! are required syntax for this script to function properly.
  481.  <P>
  482. <LI><I>owner</I> toggles how the script functions, and can be one of the
  483. following:
  484.     <UL>
  485.     <LI><i>username</i><BR>
  486.     A valid UNIX username for the system.  This makes the
  487.     guestpage/returnpage relative to ~username/$public_html.
  488.     <LI><i>http</i> or <i>root</i> (not the superuser)<BR>
  489.     Makes guestpage/returnpage relative to the WWW server's root directory
  490.     (\$wwwroot = $wwwroot).
  491.     <LI>special user name listed in the script<BR>
  492.     Makes the guestpage/returnpage relative to the special user's directory
  493.     as listed in the script.  This allows for non-UNIX usernames to be
  494.     used for guest books.
  495.     </UL>
  496.  <P>
  497.  
  498. <LI><I>guestpage</I> is the HTML file where the guestbook script will append
  499. input from the guestbook form.  This file MUST already exist and be writable
  500. by the WWW server (which usually means world writable, e.g.
  501. <CODE>-rw-rw-rw-</CODE>).  The file should probably start out something
  502. like:
  503.  
  504. <PRE>    <HTML>
  505.     <HEAD>
  506.     <TITLE>My Guestbook Title</TITLE>
  507.     </HEAD>
  508.     
  509.     <BODY>
  510.     <H1>Welcome to My Guestbook</H1>
  511.     <HR></PRE>
  512.  <P>
  513.  
  514. <LI><I>returnpage</I> is an HTML page that will be referenced after the user
  515. signs in as a return point.  It is based of the user's home page (or special
  516. user's root page) and defaults to the user's home page if nothing is
  517. specified.
  518. </UL>
  519.  <P>
  520. <HR>
  521.  
  522. <H3><A NAME="Other">Other information</A></H3>
  523. Feel free to obtain the <A HREF="${authorurl}guestbook">latest source
  524. code</A> for your own use, or <A HREF="mailto:$author">mail the author</A>
  525. any feedback/suggestions about the script.
  526.  <P>
  527. <ADDRESS><A HREF="$authorurl">$author</A></ADDRESS>
  528. </BODY>
  529. </HTML>
  530. HELPPAGE
  531.     exit;
  532. }
  533.